package 刷题10月.数组;

import java.util.Arrays;

// https://leetcode-cn.com/problems/concatenation-of-array/
public class 数组1929数组串联1017AC {

        public static int[] getConcatenation(int[] nums) {
            int arr[]=new int[nums.length*2];
            int j=0;
            for(int i=0;i<arr.length;i++){
                if(i<nums.length){
                    arr[i]=nums[i];
                }
                else{
                    arr[i]=nums[j];
                    j++;
                }
            }
            return arr;
        }

    public static void main(String[] args) {
        int arr[]=getConcatenation(new int[]{1,2,5,3});
        System.out.println(Arrays.toString(arr));
    }


}
